<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	 <link rel="stylesheet" href="http://localhost/Gshop/Gshop/Gshop/Admin/Tpl/Public/css/index.css">
	<script src="http://localhost/Gshop/Gshop/Gshop/Admin/Tpl/Public/js/jquery-1.7.2.min.js"></script>
	<script src="http://localhost/Gshop/Gshop/Gshop/Admin/Tpl/Public/js/js.js"></script>
	 <script>
	 	$(".active").live({
	 		'mouseover':function(){
	 			$(this).find('td').css({'color':'red'});
	 		},
	 		'mouseout':function(){
	 			$(this).find('td').css({'color':'green'});
	 		}
	 	})

	 </script>
</head>
<body>
	<div class="wrap">
		<div class="menu_list">
			<ul>
				<li>
					<a href="" class="action" >商品列表</a>
				</li>
				<li>
					<a href="<?php echo U(category);?>" >添加商品</a>
				</li>
			</ul>
		</div>
		<table class="table1">
			<thead>
				<tr>
					<td class='w50'>gid</td>
					<td class="w400">商品名</td>
					<td  class='w120'>栏目</td>
					<td class="w80">图片</td>
					<td class="w180">操作</td>
				</tr>
			</thead>
			<?php $hd["list"]["d"]["total"]=0;if(isset($data) && !empty($data)):$_id_d=0;$_index_d=0;$lastd=min(1000,count($data));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($data,0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>

			    	<tr class='active'>
					<td style="color:green;font-size:14px;font-weight: 700"><?php echo $d['gid'];?></td>
					<td style="color:green;font-size:14px;font-weight: 700"><?php echo $d['gname'];?></td>
					<td style="color:green;font-size:14px;font-weight: 700"><?php echo $d['cname'];?></td>
					<td>
						<img src="http://localhost/Gshop/<?php echo $d['index_pic'];?>" alt="" class="w50 h50">
					</td>
					<td>
						<a href="<?php echo U(edit,array('gid'=>$d[gid],'cid'=>$d[cid]));?>" class="btn1">编辑</a>
						<a href="<?php echo U(del,array('gid'=>$d[gid]));?>" class="btn1">删除</a>
					</td>
				</tr>
			<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
			<tr>
					<td colspan='5' align="center" style="color:green"><?php echo $page;?></td>
					
			</tr>
		</table>
	</div>
</body>
</html>